Cognitive impairments in mathematics, which affect a substantial percentage of children, could be addressed earlier in development if we had an empirically-grounded theory of the fundamental algorithms that children need to become numerate. For instance, an understanding of the cognitive system supporting early numeracy could be used to focus interventions specifically to each child's representational or process-level problems. Previous research from our group and others suggests that some of the cognitive mechanisms underlying human verbal counting are derived from developmentally and evolutionarily more primitive processes. However, a formal theory of the logical principles that relate human counting to these earlier capacities is currently lacking. By using computational modeling and behavioral analyses in human children and non-human primates, we will assess the logical principles that serve as cognitive precursors to human counting. Our behavioral experiments will provide a new empirical basis for accounts of human counting acquisition and our computational approach will formalize the logical principles underlying this capacity. We ground our formal theories in behavioral data using a novel Bayesian data analysis method that permits us to statistically evaluate a wide range of alternative hypotheses. The proposed experimental aims are innovative in that they test a new frontier of unexplored relations between children's counting and evolutionarily primitive logical reasoning. The approach is innovative in the field of child development in its application of state-of-the-art computational methods to data from human children and non-human animals. The proposed research thus stands to break substantial new ground in the methods that are used to study child development. Insights about the logical architecture underlying counting acquisition will have broad implications for our understanding of learning and development, and will provide a a new empirical basis to describe the neurology behind learning impairments in children.